import request from "@/utils/request";
export const queryPage = "/integral/api/integral/userIntegralInfo";

/*获取积分设置(员工、客户、供应商)*/
export function target_list(params) {
  return request({
    url: "/integral/api/normal/target_list",
    method: "get",
    params,
  });
}
/** 新增或修改积分规则配置(员工、客户、供应商) */
export function save_or_update(data) {
  return request({
    url: "/integral/api/normal/save_or_update",
    method: "post",
    data,
  });
}
/** 新增或修改固定积分规则配置 */
export function fixedSave_or_update(data) {
  return request({
    url: "/integral/api/fixed/save_or_update",
    method: "post",
    data,
  });
}
/** 查询固定业务积分配置 */
export function fixedTarget_list(params) {
  return request({
    url: "/integral/api/fixed/target_list",
    method: "get",
    params,
  });
}
/** 业务数据列表 */
export function getList(data) {
  return request({
    url: "/integral/api/business/getList",
    method: "post",
    data,
  });
}
/** 自定义积分配置(发放积分) */
export function grantIntegral(data) {
  return request({
    url: "/integral/api/custom/grantIntegral",
    method: "post",
    data,
  });
}
/** 删除积分规则 */
export function fixeddel(data) {
  return request({
    url: "/integral/api/fixed/del",
    method: "post",
    data,
  });
}